home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
windows
/
wdj1096.zip
/
NELSON.ZIP
/
BUG1096B.CPP
< prev
Wrap
C/C++ Source or Header
|
1996-07-30
|
532b
|
25 lines
#include <iostream.h>
extern int ext();
int inline ext()
{
static int i = 0;
return ++i;
}
static int inline stat()
{
static int i = 0;
return ++i;
}
void b()
{
cout << "For pass #2, ext() should return 2, "
<< "stat() should return 1\n";
cout << "From unit b, ext() returns " << ext()
<< ", stat() returns = " << stat() << "\n";
cout << "Address of ext() is " << (void *) ext
<< ", address of stat() is " << (void *) stat << "\n";
}